home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The 640 MEG Shareware Studio 2
/
The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO
/
clang
/
cuj1008.zip
/
1008012B
< prev
next >
Wrap
Text File
|
1992-06-12
|
339b
|
19 lines
Listing 2 -- atexit.c
/* atexit function */
#include <stdlib.h>
/* external declarations */
extern void (*_Atfuns[])(void);
extern size_t _Atcount;
int (atexit)(void (*func)(void))
{ /* function to call at exit */
if (_Atcount == 0)
return (-1); /* list is full */
_Atfuns[--_Atcount] = func;
return (0);
}